package xyz.fuqufyb.aec.feign.order;

import com.spingcloud.travel.common.TableResult;
import com.springcloud.travel.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author fyb
 * @version 1.0
 * @date 2021/3/24 11:12
 */
@FeignClient(value = "travel-order",path = "/order")
public interface OrderFeign {

    /**
     * @Author fyb
     * @Description //TODO   //获取订单列表
     * @Date 11:10 2021/3/24
     * @param map
     * @return com.spingcloud.travel.common.TableResult<com.springcloud.travel.entity.Order>
     **/
    @GetMapping("/getOrder")
    TableResult<Order> getOrder(@RequestParam("map") Map<String, String> map);


    /**
     * @param order
     * @return java.lang.Boolean
     * @Author fyb
     * @Description //TODO 新增订单
     * @Date 10:57 2021/3/24
     **/
    @PostMapping("/addOrder")
    public Boolean addOrder(@RequestBody Order order);

    /**
     * @param order
     * @return java.lang.Boolean
     * @Author fyb
     * @Description //TODO 修改订单数据
     * @Date 10:58 2021/3/24
     **/
    @PostMapping("/updateOrder")
    public Boolean updateOrder(@RequestBody Order order) ;

    /**
     * @Author fyb
     * @Description //TODO 批量删除订单
     * @Date 11:00 2021/3/24
     * @param ids
     * @return java.lang.Boolean
     **/
    @PostMapping("/delOrder")
    public Boolean delOrder(@RequestParam("ids") String[] ids);

}
